﻿using NLog;
using Scap.Info;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Scap.Core
{
    public class DeviceTaskRunner
    {
        private Logger _logger = LogManager.GetCurrentClassLogger();



        internal void Run(DeviceTaskModel model)
        {

            _logger.Info("{0} | Iniciando...", model.Device.IpAddress);

            DeviceTaskHandler handler;

            handler = new DeviceTaskHandlerConnect(model);
            handler.Run();
                       
            handler = new DeviceTaskHandlerUpload(model);
            handler.Run();

            handler = new DeviceTaskHandlerDownload(model);
            handler.Run();

            handler = new DeviceTaskHandlerStatus(model);
            handler.Run();

            handler = new DeviceTaskHandlerNotification(model);
            handler.Run();
        }
    }
}
